﻿using DotNetCore.CAP;
using Microsoft.Extensions.DependencyInjection;
using Microsoft.Extensions.Options;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using Wq.Extensions.Common;

namespace Wq.Extensions
{
    public static class CAPSetup
    {
        public static void AddHCAPSetup(this IServiceCollection services)
        {
            services.AddCap(x =>
            {
                x.UseMySql(AppSettings.app("ConnectionStrings:Dashboard"));
                x.UseRedis(AppSettings.app("ConnectionStrings:Redis"));
                x.UseDashboard();
            });
        }
    }
}
